<table id="product_${action_id}"></table>
<div id="product_${action_id}_tb" style="padding:5px;height:auto">
	<div>
		${action.getDatagridTitle('name')}: 
		<input class="easyui-validatebox" style="width: 200px;" name="_searcher_lky_name" >
		<a href="javascript:$('#product_${action_id}_tb').searcher('doSearch');" class="easyui-linkbutton" data-options="iconCls:'icon-search'" >查询</a>
	</div>
</div>

<script type="text/javascript">

$('#product_${action_id}_tb').searcher({
	doSearch:function(qp){
		$('#product_${action_id}').datagrid('options').queryParams = qp;
		$('#product_${action_id}').datagrid('reload');
	}
});

$('#product_${action_id}').datagrid({
	iconCls:'icon-save',
	width:'auto',
	height:'auto',
	nowrap: false,
	fit:true,
	singleSelect : ${cb?string('false','true')},
	fitColumns:true,
	striped: true,
	url:'${request.contextPath}${namespace?default('')}/mp/product/product-datagrid.json',
	sortName: 'serial',
	sortOrder: 'asc',
	remoteSort: true,
	idField:'id',
	onBeforeLoad:function(){$('#product_${action_id}').datagrid('unselectAll');},
	columns:[[
				{title:'${action.getDatagridTitle('serial')}',field:'serial',width:100,align:'center'},
				{title:'${action.getDatagridTitle('name')}',field:'name',width:100,align:'center'},
				{title:'${action.getDatagridTitle('classify')}',field:'classify',width:100,align:'center',formatter:function(val,rec){
					return rec.name;
				}},
				{title:'${action.getDatagridTitle('price')}',field:'price',width:100,align:'center'}
			]],
	pagination:true,
	rownumbers:true,
	onDblClickRow:function(idx,data){if(typeof onDblClickRow_${action_id} != 'undefined'){onDblClickRow_${action_id}(idx,data)}},
	onClickRow:function(idx,data){if(typeof onClickRow_${action_id} != 'undefined'){onClickRow_${action_id}(idx,data)}},
	onRowContextMenu:function(e,idx,data){if(typeof onRowContextMenu_${action_id} != 'undefined'){$(this).datagrid('selectRow', idx);onRowContextMenu_${action_id}(e,idx,data)}},
	toolbar:'#product_${action_id}_tb'
});
</script>